#ifndef STATISTICS_H
#define STATISTICS_H

#include <stdio.h>

#include "graph.h"

typedef struct Stat_PR_t
{
  double stat_max_weight;
  int * stat_p_max_var_vals;
  int stat_num_max_updates;
  int stat_num_updates;
  
} Stat_PR_t;

typedef struct Stat_MPE_t
{
  int * stat_p_var_vals;
  double stat_weight;
  
} Stat_MPE_t;

typedef struct Stat_MAR_t
{
  int ** stat_pp_cnt_var_vals;
  int stat_num_updates;
  
} Stat_MAR_t;

typedef struct Stat_BEL_t
{
  int ** stat_pp_cnt_fac_vals;
  int stat_num_updates;
  
} Stat_BEL_t;


void stat_PR_init(Stat_PR_t * p_stat, Graph_t * p_graph);

void stat_PR_update(Stat_PR_t * p_stat, Graph_t * p_graph, int * var_vals);

void stat_PR_write(Stat_PR_t * p_stat, Graph_t * p_graph, FILE * fp);

void stat_MPE_init(Stat_MPE_t * p_stat, Graph_t * p_graph);

void stat_MPE_update(Stat_MPE_t * p_stat, Graph_t * p_graph, int * var_vals);

void stat_MPE_write(Stat_MPE_t * p_stat, Graph_t * p_graph, FILE * fp);

void stat_MAR_init(Stat_MAR_t * p_stat, Graph_t * p_graph);

void stat_MAR_update(Stat_MAR_t * p_stat, Graph_t * p_graph, int * var_vals);

void stat_MAR_write(Stat_MAR_t * p_stat, Graph_t * p_graph, FILE * fp);

void stat_BEL_init(Stat_BEL_t * p_stat, Graph_t * p_graph);

void stat_BEL_update(Stat_BEL_t * p_stat, Graph_t * p_graph, int * var_vals);

void stat_BEL_write(Stat_BEL_t * p_stat, Graph_t * p_graph, FILE * fp);

#endif /* STATISTICS_H */
